State Machine
A basic state machine that is not thread safe.
Constructors
Link copied to clipboard
fun <S, T : Any> StateMachine(initialState: S, vararg transitionRules: TransitionDef<S, out T>)
Content copied to clipboard
Link copied to clipboard
fun <S, T : Any> StateMachine(initialState: S, transitions: List<TransitionDef<S, out T>>)
Content copied to clipboard
Types
Functions
Link copied to clipboard
fun registerCallback(transitionCallback: TransitionCallback<S, T>): Boolean
Content copied to clipboard
Register a callback for state transition updates.
Link copied to clipboard
Transition the machine.
Link copied to clipboard
Get the transition required to move to a given state.
Link copied to clipboard
fun unregisterCallback(transitionCallback: TransitionCallback<S, T>): Boolean
Content copied to clipboard
Unregister a callback from state transition updates.